package com.itheima.mall.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 产品分类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("pms_product_category")
public class ProductCategory {

    private Long id;
    private Long parentId;
    private String name;
    private Long level;
    private Long productCount;
    private String productUnit;
    private Long navStatus;
    private Long showStatus;
    private Long sort;
    private String icon;
    private String keywords;
    private String description;

    //查询以及分类及子类
    @TableField(exist = false)
    List<ProductCategory> children;

}
